<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
    <link rel="stylesheet" href="/api-test/static/plugins/layui/css/layui.css"/>
    <link rel="stylesheet" href="/api-test/static/css/home.css"/>
    <title>角色管理</title>
</head>

<body class="layui-view-body">
<div class="layui-content">
    <div class="layui-row">
        <div class="layui-card">
            <div class="layui-card-body">
                <div class="form-box">
                    <div class="layui-form layui-form-item">
                        <form id="role-search-form" class="layui-inline searchMain">
                            <div class="layui-form-mid">角色名称:</div>
                            <div class="layui-input-inline">
                                <input type="text" name="name" autocomplete="off" class="layui-input" placeholder="请输入角色名称"/>
                            </div>
                            <div class="layui-form-mid">角色状态:</div>
                            <div class="layui-input-inline">
                                <select name="state">
                                    <option value="">全部</option>
                                    <option value="1">有效</option>
                                    <option value="0">无效</option>
                                </select>
                            </div>
                            <button class="layui-btn layui-btn-blue search-btn">查询</button>
                        </form>
                        <button class="layui-btn layui-bg-green fr" id="role-add">添加</button>
                    </div>

                    <table class="layui-hide" id="role-table" lay-filter="role-table"></table>
                </div>
            </div>
        </div>
    </div>
</div>

<div id="role-add-dialog" class="layui-content" style="display: none;">
    <form id="role-add-form" class="layui-form">
		<input type="hidden" name="token" />
        <div class="layui-form-item">
            <label class="layui-form-label">角色名称</label>
            <div class="layui-input-block" style="width: 200px">
                <input type="text" name="name" required="required" lay-verify="required" placeholder="请输入角色名称" autocomplete="off" class="layui-input"/>
            </div>
        </div>
        <button id="role-add-btn" class="layui-btn" lay-submit="" lay-filter="role-add-form" style="display: none;">提交</button>
    </form>
</div>

<div id="role-edit-dialog" class="layui-content" style="display: none;">
    <form id="role-edit-form" class="layui-form">
        <input type="hidden" name="id"/>
		<input type="hidden" name="token" />
        <div class="layui-form-item">
            <label class="layui-form-label">角色名称</label>
            <div class="layui-input-block" style="width: 200px">
                <input type="text" name="name" required="required" lay-verify="required" placeholder="请输入角色名称" autocomplete="off" class="layui-input"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">角色状态</label>
            <div class="layui-input-block" style="width: 200px">
                <select name="state" lay-verify="required">
                    <option value="1">有效</option>
                    <option value="0">无效</option>
                </select>
            </div>
        </div>
    </form>
</div>

<!-- 权限树 -->
<div id="role-permission-tree-dialog" style="display: none;">
    <form class="layui-form">
        <div class="layui-form-item">
            <div style="margin-left: 10px;">
                <div id="role-permission-tree"></div>
            </div>
        </div>
    </form>
</div>

<script src="/api-test/static/plugins/layui/layui.js"></script>
<script src="/api-test/static/common/js/base.js"></script>
<script src="/api-test/static/js/auth/role.js"></script>
</body>
</html>